<template>
  <tr class="table-lm-title">
    <td>{{ index + 1 }}</td>
    <td><img style="width: 50px;height: 50px;border-radius: 50px;" :src="user.portrait" alt="头像"></td>
    <td>{{ user.fullName }}</td>
    <td>{{ user.hasRole[0].name }}</td>
    <td>{{ user.loginAccount }}</td>
    <td>{{ user.teachingExperience }}</td>
    <td>{{ user.nickName || '' }}</td>
    <td>{{ user.rating }}</td>
    <td>{{ user.email }}</td>
    <td>{{ user.phone }}</td>
    <td>{{ user.creatorFullName }}</td>
    <td>{{ user.creatorRoleName }}</td>
    <td><span class="ui-btn ui-btn-default" v-on:click="modifyUserInfo(user)">修改信息</span> | <span class="ui-btn ui-btn-default" v-on:click="modifyPortrait(user.id)" v-if="user.isTeacher">修改头像</span><span v-if="user.isTeacher">|</span><span class="ui-btn ui-btn-default" v-on:click="deleteUser(user)" >删除</span> | <span class="ui-btn ui-btn-default" v-on:click="modifyPassword(user)" >修改密码</span></td>
  </tr>
</template>
<style lang="less">

</style>
<script>
    export default{
      name: 'item',
      props: ['user', 'index'],
      methods: {
        modifyUserInfo () {

        },
        modifyPortrait () {

        },
        deleteUser () {

        },
        modifyPassword () {

        }
      }
    }
</script>
